]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altSwitcher: Fix error when all alternatives are disabled
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 16 Nov 2018 10:39:08 +0000 (11:39 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Sat, 17 Nov 2018 12:18:23 +0000 (12:18 +0000)
While we do consider the case that we don't have a child to show for the
visibility, we are still trying to move the click action unconditionally.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/783

js/ui/status/system.js

index c695f37be50d6d954dd5dc15c8e9f521686612d4..41bcacd9423d6114a47b2a97ff4bba7c5641f94e 100644 (file)
@@ -58,6 +58,9 @@ var AltSwitcher = new Lang.Class({
             childToShow = this._standard;
         } else if (this._alternate.visible) {
             childToShow = this._alternate;
+        } else {
+            this.actor.hide();
+            return;
         }
 
         let childShown = this.actor.get_child();
@@ -79,7 +82,7 @@ var AltSwitcher = new Lang.Class({
             global.sync_pointer();
         }
 
-        this.actor.visible = (childToShow != null);
+        this.actor.show();
     },
 
     _onDestroy() {